﻿using B.S.DataBase.MyProject.Domain;
using Microsoft.EntityFrameworkCore;

namespace B.S.DataBase.MyProject.Infrastructure
{
    /// <summary>
    /// 上下文
    /// </summary>
    public class SDbContext : DbContext
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="options"></param>
        public SDbContext(DbContextOptions options) : base(options)
        {
        }
        /// <summary>
        /// 用户
        /// </summary>
        public DbSet<User> Users { get; set; }
        /// <summary>
        /// 角色
        /// </summary>
        public DbSet<Role> Roles { get; set; }
        /// <summary>
        /// 用户角色
        /// </summary>
        public DbSet<UserRole> UserRoles { get; set; }
        /// <summary>
        /// 菜单
        /// </summary>
        public DbSet<Menu> Menus { get; set; }
        /// <summary>
        /// 角色菜单
        /// </summary>
        public DbSet<RoleMenu> RoleMenu { get; set; }
        /// <summary>
        /// 请假申请表
        /// </summary>
        public DbSet<LeaveApplication> LeaveApplication { get; set; }
        /// <summary>
        /// 请假记录表
        /// </summary>
        public DbSet<ApprovalRecord> ApprovalRecord { get; set; }
       
    }
}


